package com.sh.business.mapper;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.sh.business.domain.Mining;
import com.sh.business.domain.vo.MiningVo;
import com.sh.common.mybatis.core.mapper.BaseMapperPlus;

import java.math.BigDecimal;

/**
 * 矿机Mapper接口
 *
 * @author ruoyi
 * @date 2024-10-08
 */
public interface MiningMapper extends BaseMapperPlus<Mining, MiningVo> {

    default Mining queryByPrice(BigDecimal price) {
        return selectOne(Wrappers.<Mining>lambdaQuery().eq(Mining::getPrice, price));
    }

}
